﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://www.codeplex.com/EmlenMud
namespace UserInterface
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    using BrainTechLLC;

    public partial class PropertyGridView : UserControl
    {
        #region Fields

        protected object _viewing;

        #endregion Fields

        #region Constructors

        public PropertyGridView()
        {
            InitializeComponent();
        }

        #endregion Constructors

        #region Properties

        public object ViewingObject
        {
            get
            {
                return _viewing;
            }
            set
            {
                if (!_viewing.AreEqual(value))
                {
                    _viewing = value;
                    propertyGrid1.SelectedObject = value;
                }
            }
        }

        #endregion Properties
    }
}